<template>
  <div>
    <el-form :inline="true" align="center">
      <el-form-item label="科室名称">
        <el-input type="text" :value="hospitalDept.deptname" />
      </el-form-item>
      <el-form-item label="创建时间">
        <el-input
          type="text"
          :value="hospitalDept.deptcreatetime"
        /> </el-form-item
      ><br />
      <el-form-item>
        <el-button type="primary"> <router-link :to="'/hospital/updateHospitalDept/'+hospitalDept.id">编辑</router-link></el-button>
        <el-button type="primary"> <router-link to="/hospital/hospitalDeptList">返回</router-link></el-button>
      </el-form-item>
    </el-form>
  </div>
</template>

<script>
export default {
  data() {
    return {
      hospitalDept: {},
    };
  },
  mounted() {
    var id = this.$route.params.id;
    this.$axios({
      url: `http://localhost:8080/jiapei/hos-dept/hospitalDept/${id}`,
      method: "GET",
    }).then((res) => {
      this.hospitalDept = res.data.data.hospitalDept;
    });
  },
};
</script>

<style>
</style>